From 6243c7122cf1a315c9b3b9ab71fad4d93f2d5275 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Tue, 2 Sep 2014 16:22:12 +0200 Subject: [PATCH] gdkwindow: Fix update area calculations for native subwindows When recursing the update area down into native subwindows we forgot to apply the native window position. This caused us to repaint the wrong thing in certain cases. I noticed this when playing with the wip/gdk-gl branch, because it was triggering unnecessary repaints of the (native window) gl widgets. --- gdk/gdkwindow.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c index b9b2e28b70..0460ffca81 100644 --- a/gdk/gdkwindow.c +++ b/gdk/gdkwindow.c @@ -3762,23 +3762,18 @@ invalidate_impl_subwindows (GdkWindow *window, if (gdk_window_has_impl (child)) { cairo_region_t *tmp = cairo_region_copy (region); - cairo_region_translate (tmp, -dx, -dy); + cairo_region_translate (tmp, -dx - child->x, -dy - child->y); gdk_window_invalidate_maybe_recurse_full (child, tmp, child_func, user_data); cairo_region_destroy (tmp); } else { - dx += child->x; - dy += child->y; invalidate_impl_subwindows (child, region, child_func, user_data, - dx, dy); - dx -= child->x; - dy -= child->y; + dx + child->x, dy + child->y); } - } } } -- 2.30.2